package com.bingo.demo.pojo;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;

public class Album {
    Integer id;
    Integer userId;
    String imgUrl;
    String imgKey;
    String imgMessage;//照片信息
    Timestamp publishTime;//发布时间
    Boolean main;//判断是否为主页图片

    public Album() {
    }

    public Album(Integer id, Integer userId, String imgUrl, String imgKey, String imgMessage, Timestamp publishTime, Boolean main) {
        this.id = id;
        this.userId = userId;
        this.imgUrl = imgUrl;
        this.imgKey = imgKey;
        this.imgMessage = imgMessage;
        this.publishTime = publishTime;
        this.main = main;
    }

    public String getImgMessage() {
        return imgMessage;
    }

    public void setImgMessage(String imgMessage) {
        this.imgMessage = imgMessage;
    }

    public String getPublishTime() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String format = sdf.format(publishTime);
        return format;
    }

    public void setPublishTime(Timestamp publishTime) {
        this.publishTime = publishTime;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public Boolean getMain() {
        return main;
    }

    public void setMain(Boolean main) {
        this.main = main;
    }

    public String getImgKey() {
        return imgKey;
    }

    public void setImgKey(String imgKey) {
        this.imgKey = imgKey;
    }
}
